﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Scap.Info
{
    public class ScapDepartment
    {
        public int Id { get; set; }

        [Required]
        [Display(Name = "Nombre")]
        public string Name { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Required]
        public int TypeId { get; set; }

        [ForeignKey("TypeId")]
        public ScapDepartmentType Type { get; set; }

        public int? AddressId { get; set; }
                
        [ForeignKey("AddressId")]
        public ScapLocationAddress Address { get; set; }

        public int? ParentDepartmentId { get; set; }

        [ForeignKey("ParentDepartmentId")]
        public ScapDepartment ParentDepartment { get; set; }

        public List<ScapDevice> Devices { get; set; }

        [Required]
        public int CompanyId { get; set; }

        [ForeignKey("CompanyId")]
        public ScapCompany Company { get; set; }
    }

   
}
